home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / util / dtype / cdt_39_10.lha / cdt / misc / debug.h < prev    next >
C/C++ Source or Header  |  1995-04-28  |  677b  |  45 lines

  1. #ifndef DEBUG_H
  2. #define DEBUG_H
  3.  
  4. /* debug.h
  5. **
  6. ** $VER: debug.h 0.1 (31.03.94)
  7. **
  8. ** by
  9. **
  10. ** Stefan Ruppert , Windthorststraße 5 , 65439 Flörsheim , GERMANY
  11. **
  12. ** (C) Copyright 1994
  13. ** All Rights Reserved !
  14. **
  15. ** $HISTORY:
  16. **
  17. ** 31.03.94 : 000.001 : initial
  18. */
  19.  
  20. #define bug      kprintf
  21.  
  22. #ifdef DEBUG
  23.  
  24. extern void kprintf(char *fmt,...);
  25.  
  26. #define D(x)     x
  27. #define DB(x)   { bug(__FILE__ "(%4ld):" __FUNC__ "() :",__LINE__); \
  28.                   bug x; \
  29.                 }
  30.  
  31. #define ENTERING  bug("entering " __FUNC__ "()\n")
  32. #define LEAVING   bug("leaving " __FUNC__ "()\n")
  33.  
  34. #else
  35.  
  36. #define D(x)
  37. #define DB(x)
  38. #define ENTERING
  39. #define LEAVING
  40.  
  41. #endif
  42.  
  43. #endif   /* DEBUG_H */
  44.  
  45.